package com.crime.crimemonitorclient;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;

public class DetailUzemiActivity extends Activity
{

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_detail_uzemi);

		Bundle contextData = this.getIntent().getExtras();

		if (contextData != null)
		{
			TextView nazevUtvaruView = (TextView)this.findViewById(R.id.detail_uzemi_nazev_utvaru);
			nazevUtvaruView.setText(contextData.getString("utvar"));

			String nazvyObci[] = contextData.getStringArray("obce");
			// nazvy obci
			StringBuilder sb = new StringBuilder();
			final String obceDelim = ",";

			sb.append(nazvyObci[0]);

			for (int i = 1; i < nazvyObci.length; ++i)
			{
				sb.append(obceDelim);
				sb.append(nazvyObci[i]);
			}

			TextView nazvyObciView = (TextView)this.findViewById(R.id.detail_uzemi_nazvy_obci);
			nazvyObciView.setText(sb.toString());
		}
	}
}
